package hanjia;

public class hanjia22 {
	public static void main(String [] args){
        int n = 5;
        System.out.println(factorial(n));
    }
    public static long factorial(int n){
        long Sum = 0;
        if (n == 1)
            Sum = 1;
        else
            Sum = n*factorial(n-1);
 
        return Sum;
 
    }
}
